import React from 'react';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import Ticon from "../ticon/Ticon";

class TableCellIcon extends React.Component {
    render() {
        const {style, iconStyle, name, size, color} = this.props;
        return (
            <View style={{
                marginRight: 10,
                alignItems: 'center',
                justifyContent: 'center',
                ...style
            }}>
                <Ticon name={name} color={color} size={size} style={iconStyle}/>
            </View>
        );
    }
}

TableCellIcon.propTypes = {
    style: PropTypes.object,
    iconStyle: PropTypes.object,
    name: PropTypes.string,
    color: PropTypes.string,
    size: PropTypes.number
}

TableCellIcon.defaultProps = {
    style: {},
    iconStyle: {},
    color: '#333',
    size: 25
}

export default TableCellIcon;
